﻿

<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
	WorldExpSearchEvent event = (WorldExpSearchEvent)context.getSessionValue("WorldExpSearchEvent");
	ObjectList list = WorldExp.fetch().search(con,event);
    
	String warehouseCode = loginInfo.getLoginWarehouseCode();
    String warehouseJTCode = WorldExp.changeWarehouseJTCode(warehouseCode);
%>

<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<%@page import="system.SelectManager"%>
<%@page import="system.base.WorldExp"%>
<script language=javascript>

var list_code = "listWorldExp";

function doSearch()
{

	//SetValue("s_Id",GetValue("i_Id")); //编号

	SetValue("s_BillTypeCode",GetValue("i_BillTypeCode")); //单据类型代号

	//SetValue("s_BillType",GetValue("i_BillType")); //单据类型

	SetValue("s_MaterialCode",GetValue("i_MaterialCode")); //维修材料清单号

	SetValue("s_BalanceCode",GetValue("i_BalanceCode")); //结算单编号

	SetValue("s_WarehouseCode",GetValue("i_WarehouseCode")); //公司编号

	//SetValue("s_WarehouseName",GetValue("i_WarehouseName")); //公司名称

	SetValue("s_BusCode",GetValue("i_BusCode")); //车辆自编号

	SetValue("s_BusType",GetValue("i_BusType")); //车型

	SetValue("s_PzCode",GetValue("i_PzCode")); //牌照号码

	SetValue("s_InDate",GetValue("i_InDate")); //进厂日期

	SetValue("s_OutDate",GetValue("i_OutDate")); //出厂日期

	//SetValue("s_Line",GetValue("i_Line")); //线路

	//SetValue("s_CheckPerson",GetValue("i_CheckPerson")); //质量检验员

	//SetValue("s_BalancePerson",GetValue("i_BalancePerson")); //结算员

	//SetValue("s_Kilo",GetValue("i_Kilo")); //出厂公里数

	//SetValue("s_GsPrice",GetValue("i_GsPrice")); //工时费

	//SetValue("s_MaterialPrice",GetValue("i_MaterialPrice")); //材料费

	//SetValue("s_WjgPrice",GetValue("i_WjgPrice")); //外加工费

	//SetValue("s_UploadPersonId",GetValue("i_UploadPersonId")); //上传人帐号ID

	//SetValue("s_UploadPerson",GetValue("i_UploadPerson")); //上传人账号

	//SetValue("s_UploadTime",GetValue("i_UploadTime")); //上传时间

	//SetValue("s_FileName",GetValue("i_FileName")); //文件名

	//SetValue("s_FilePath",GetValue("i_FilePath")); //文件路径
	

	SetValue("s_OrderField",GetValue("i_OrderField")); //排序
	SetValue("s_OrderDesc",getCheckBoxValues("i_OrderDesc")); //升降序
	doCommonSearch();
}

function bizViewWorldExp(id)
{
	viewWin("<%=Config.getSrv()%>?action_code=viewWorldExp&Id="+id);
}

function doDelete()
{
	if(!hasChooseRadio("ids"))
	{
		bizMessage("删除","车辆整治数据");
		return false;
	}
	if(!bizConfirm("删除","车辆整治数据")) return false;
	SetAction("deleteWorldExp");
	frm.submit();
}

function doToAdd()
{
	SetAction("toAddWorldExp");
	frm.submit();
}

function doToUpdate()
{
	if(!checkOne("ids")) 
	{
		bizMessage("修改","T_WORLD_EXP");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toUpdateWorldExp");
	frm.submit();
}
function doToCopy()
{
	if(!checkOne("ids")) 
	{
		bizMessage("复制","T_WORLD_EXP");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toCopyWorldExp");
	frm.submit();
}

key_InitDefault();
key_RegSubmitHandler(doSearch);
</script>


<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->
<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code" value="">
<input type=hidden name="Id" value="">
<input type=hidden name=sortOrder value="1">

<!--查询条件保留区域-->

<input type=hidden name="s_Id" value="<%=event.getId()%>"> <!--编号-->

<input type=hidden name="s_BillTypeCode" value="<%=event.getBillTypeCode()%>"> <!--单据类型代号-->

<input type=hidden name="s_BillType" value="<%=event.getBillType()%>"> <!--单据类型-->

<input type=hidden name="s_MaterialCode" value="<%=event.getMaterialCode()%>"> <!--维修材料清单号-->

<input type=hidden name="s_BalanceCode" value="<%=event.getBalanceCode()%>"> <!--结算单编号-->

<input type=hidden name="s_WarehouseCode" value="<%=event.getWarehouseCode()%>"> <!--公司编号-->

<input type=hidden name="s_WarehouseName" value="<%=event.getWarehouseName()%>"> <!--公司名称-->

<input type=hidden name="s_BusCode" value="<%=event.getBusCode()%>"> <!--车辆自编号-->

<input type=hidden name="s_BusType" value="<%=event.getBusType()%>"> <!--车型-->

<input type=hidden name="s_PzCode" value="<%=event.getPzCode()%>"> <!--牌照号码-->

<input type=hidden name="s_InDate" value="<%=event.getInDate()%>"> <!--进厂日期-->

<input type=hidden name="s_OutDate" value="<%=event.getOutDate()%>"> <!--出厂日期-->

<input type=hidden name="s_Line" value="<%=event.getLine()%>"> <!--线路-->

<input type=hidden name="s_CheckPerson" value="<%=event.getCheckPerson()%>"> <!--质量检验员-->

<input type=hidden name="s_BalancePerson" value="<%=event.getBalancePerson()%>"> <!--结算员-->

<input type=hidden name="s_Kilo" value="<%=event.getKilo()%>"> <!--出厂公里数-->

<input type=hidden name="s_GsPrice" value="<%=event.getGsPrice()%>"> <!--工时费-->

<input type=hidden name="s_MaterialPrice" value="<%=event.getMaterialPrice()%>"> <!--材料费-->

<input type=hidden name="s_WjgPrice" value="<%=event.getWjgPrice()%>"> <!--外加工费-->

<input type=hidden name="s_UploadPersonId" value="<%=event.getUploadPersonId()%>"> <!--上传人帐号ID-->

<input type=hidden name="s_UploadPerson" value="<%=event.getUploadPerson()%>"> <!--上传人账号-->

<input type=hidden name="s_UploadTime" value="<%=event.getUploadTime()%>"> <!--上传时间-->

<input type=hidden name="s_FileName" value="<%=event.getFileName()%>"> <!--文件名-->

<input type=hidden name="s_FilePath" value="<%=event.getFilePath()%>"> <!--文件路径-->


<%@ include file="/framework/list_head.jsp"%>

<br>
<!--********************* Part5:Search Area ***************-->
<%=uiSearchStart%>>
<%
	int key_tab = 1 ;
%>


	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			整治类型&nbsp;&nbsp;：<%=SelectManager.viewWorldExpBillType("i_BillTypeCode",event.viewBillTypeCode(),true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%>
            &nbsp;&nbsp;&nbsp;&nbsp;维修材料清单号：<input type="text" class="texts" name="i_MaterialCode" size="20" value="<%=event.viewMaterialCode()%>" key_tab="<%=key_tab++%>">
            &nbsp;&nbsp;&nbsp;&nbsp;结算单编号：<input type="text" class="texts" name="i_BalanceCode" size="20" value="<%=event.viewBalanceCode()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>


	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			公司编号&nbsp;&nbsp;：<%=SelectManager.viewWarehouseJTCode("i_WarehouseCode",event.viewWarehouseCode(),true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++), warehouseCode)%>
            &nbsp;&nbsp;&nbsp;&nbsp;车辆自编号&nbsp;&nbsp;&nbsp;&nbsp;：<input type="text" class="texts" name="i_BusCode" size="20" value="<%=event.viewBusCode()%>" key_tab="<%=key_tab++%>">
            &nbsp;&nbsp;&nbsp;&nbsp;车型&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;：<%=SelectManager.viewWorldExpBusType("i_BusType",event.viewBusType(),true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%>
		</td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
              车牌号&nbsp;&nbsp;&nbsp;&nbsp;：<input type="text" class="texts" name="i_PzCode" size="20" value="<%=event.viewPzCode()%>" key_tab="<%=key_tab++%>">
			&nbsp;&nbsp;&nbsp;&nbsp;进出厂日期&nbsp;&nbsp;&nbsp;&nbsp;：<%=framework.custom.UIManager.generateDateInput("i_InDate", event.viewInDate())%> 至 <%=framework.custom.UIManager.generateDateInput("i_OutDate", event.viewOutDate())%>
		</td>		
	</tr>

    <%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			按排序&nbsp;&nbsp;&nbsp;&nbsp;：
		
			<select name="i_OrderField">
				<option value="" <%=(event.getOrderField().equals("1"))?"selected":""%>>设置排序字段</option>
				
				<option value="BILL_TYPE_CODE" <%=(event.getOrderField().equals("BILL_TYPE_CODE"))?"selected":""%>>单据类型</option>
				
				<option value="MATERIAL_CODE" <%=(event.getOrderField().equals("MATERIAL_CODE"))?"selected":""%>>维修材料清单号</option>
				
				<option value="BALANCE_CODE" <%=(event.getOrderField().equals("BALANCE_CODE"))?"selected":""%>>结算单编号</option>
				
				<option value="WAREHOUSE_CODE" <%=(event.getOrderField().equals("WAREHOUSE_CODE"))?"selected":""%>>公司</option>
				
				<option value="BUS_TYPE" <%=(event.getOrderField().equals("BUS_TYPE"))?"selected":""%>>车型</option>
				
				<option value="IN_DATE" <%=(event.getOrderField().equals("IN_DATE"))?"selected":""%>>进厂日期</option>
				
				<option value="OUT_DATE" <%=(event.getOrderField().equals("OUT_DATE"))?"selected":""%>>出厂日期</option>
				
				<option value="LINE" <%=(event.getOrderField().equals("LINE"))?"selected":""%>>线路</option>
				
				<option value="KILO" <%=(event.getOrderField().equals("KILO"))?"selected":""%>>出厂公里数</option>
				
				<option value="GS_PRICE" <%=(event.getOrderField().equals("GS_PRICE"))?"selected":""%>>工时费</option>
				
				<option value="MATERIAL_PRICE" <%=(event.getOrderField().equals("MATERIAL_PRICE"))?"selected":""%>>材料费</option>
				
				<option value="WJG_PRICE" <%=(event.getOrderField().equals("WJG_PRICE"))?"selected":""%>>外加工费</option>
				
			</select>
			&nbsp;&nbsp;
			<input type="radio" name="i_OrderDesc" value="false" <%=(event.isOrderDesc()==false)?"checked":""%> >升序
			<input type="radio" name="i_OrderDesc" value="true"  <%=(event.isOrderDesc()==true)?"checked":""%>  >降序
			<input type="button" value="查询" class="buttons" onclick="doSearch();return false;">&nbsp;<input type="button" value="清空" class="buttons" onclick="doClearEvent();return false;">
		</td>
	</tr>

<%=uiSearchEnd%>

<!--列表标题-->
<%=UIManager.addListHeadTitle("迎世博600天车辆整治数据列表")%>

<!--********************* Part6:List Area ***************-->

<%=uiListStart%>>

<%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1 ;
%>	
	<%=uiListHeadTR%>>
		<%=UIManager.addListHeadCheckBox() %>

    	<%=UIManager.addListHead("单据类型",index++)%>

		<%=UIManager.addListHead("维修材料清单号",index++)%>

		<%=UIManager.addListHead("结算单编号",index++)%>

    	<%=UIManager.addListHead("公司名称",index++)%>

		<%=UIManager.addListHead("车辆自编号",index++)%>
        
        <%=UIManager.addListHead("车牌号",index++)%>

		<%=UIManager.addListHead("车型",index++)%>

     	<%=UIManager.addListHead("进厂日期",index++)%>

		<%=UIManager.addListHead("出厂日期",index++)%>

		<%=UIManager.addListHead("线路",index++)%>

		<%=UIManager.addListHead("出厂公里数",index++,"num")%>

		<%=UIManager.addListHead("工时费",index++,"num")%>

		<%=UIManager.addListHead("材料费",index++,"num")%>

		<%=UIManager.addListHead("外加工费",index++,"num")%>

		<%=UIManager.addListHead("操作",-1)%>  
	<%=uiListHeadTREnd%>>
	
	<!--data-->
<%
	for(int i=0;i<list.size();i++)
	{
		WorldExp obj = (WorldExp)list.get(i);
%>
	<%=uiListDataTR[i%2]%> align=center>
    	<%=uiListDataTD%>>
    		<input type="checkbox" name="ids" value="<%=obj.getId()%>">
    	</td>
    	
    
    	<%=uiListDataTD%>><%=obj.viewBillType(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewMaterialCode(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewBalanceCode(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewWarehouseName(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewBusCode(con)%></td>
        
        <%=uiListDataTD%>><%=obj.viewPzCode(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewBusType(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewInDate(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewOutDate(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewLine(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewKilo(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewGsPrice(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewMaterialPrice(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewWjgPrice(con)%></td>
    
    	<%=uiListDataTD%>>
    		<a href="" onclick="bizViewWorldExp('<%=obj.getId()%>');return false;">浏览</a>
    	</td>
  	</tr>
<%	
	}
%>  

<%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%>


<!--********************* Part7:Action Area ***************-->
<%=uiCommandStart%>>
	<%=uiCommandTR%>>
		<%=uiCommandTD%>>
        <!--
		<input type=button value="    添加   " class="buttons" onclick="doToAdd();return false;">
		<input type=button value="    复制   " class="buttons" onclick="doToCopy();return false;">
		<input type=button value="    修改   " class="buttons" onclick="doToUpdate();return false;">
        -->
<%
if("00".equals(warehouseJTCode)){
%>        
		<input type=button value="    删除   " class="buttons" onclick="doDelete();return false;">
<%
}
%>        
		</td>
	</tr>	
<%=uiCommandEnd%>
</form>


<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :Arrow
	FileName  :/system/base/WorldExpList.jsp
-->
